package top.yaofengqiao.springcloudsimple.payment.biz.domain.pay.repository;

import top.yaofengqiao.springcloudsimple.payment.biz.domain.pay.model.entity.PaymentOrderEntity;
import top.yaofengqiao.springcloudsimple.payment.biz.domain.pay.model.valobj.PaymentOrderStatus;

import java.util.List;

/**
 * @author yfq
 * @date 2024/6/14 16:59
 * @description
 */
public interface IPaymentOrderRepository {
    long save(PaymentOrderEntity paymentOrderEntity);

    PaymentOrderEntity queryByRechargeOrderNo(String orderNo);

    PaymentOrderEntity queryByPayOrderNo(String payOrderNo);

    void orderTrading(long orderId, String content);

    boolean updatePaymentOrderByPayOrderNo(PaymentOrderEntity paymentOrderEntity);

    void changeStatus(String rechargeOrderNo, PaymentOrderStatus origin, PaymentOrderStatus target);

    List<PaymentOrderEntity> queryUnPaymentOrder(long startId, int limit);
}
